<template>
    <div class="good-list">
        <div v-for="(item,index) of goods" :key="index" @click="detail(item.id)">
            <GoodIndex :good="item"/>
        </div>
    </div>
</template>

<script>
import GoodIndex from "./index";

export default {
    name: "",
    data() {
        return {};
    },
    props: {
        goods:{
            type:Array
        }
    },
    methods: {
        detail(id){
            this.$router.push('/good/'+id);
        }
    },
    components: { GoodIndex }
};
</script>

<style scoped>
.good-list {
    width: 100%;
    display: flex;
    margin: 10px 0;
}
.good-list>div{
    width: 33%;
}
</style>
